package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"varchar(30)"`
	Password string `gorm:"varchar(32)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Node struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

type Courier struct {
	gorm.Model
	CourCode  string `gorm:"type:varchar(50)"`
	CourName  string `gorm:"type:varchar(50)"`
	CourPhone string `gorm:"type:varchar(11)"`
}

type Order struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	Pid       int    `gorm:"type:int"`
}

type CourOrder struct {
	OrderId   int
	OrderCode string
	OrderTo   string
	CourCode  string
	CourName  string
	CourPhone string
}
